/*****************************************************************************
 * Copyright (C) Stacy Curl. All rights reserved.                            *
 * ------------------------------------------------------------------------- *
 * The software in this package is published under the terms of the BSD      *
 * style license a copy of which has been included with this distribution in *
 * the LICENSE.txt file.                                                     *
 *****************************************************************************/
package picounit.features.signature_factory;

import picounit.features.base.ProxyFactory;
import picounit.features.parameter_name.MethodParameterRegistry;
import picounit.features.registry.Resolver;
import picounit.mocker.MockFactory;

import java.lang.reflect.InvocationHandler;

public class SignatureFactoryFactory {
	private final MethodParameterRegistry methodParameterRegistry;
	private final MockFactory mockFactory;
	private final ProxyFactory proxyFactory;
	private final InvocationHandler collaboratorsInvocationHandler;

	public SignatureFactoryFactory(MethodParameterRegistry methodParameterRegistry, 
		MockFactory mockFactory, ProxyFactory proxyFactory,
		InvocationHandler collaboratorsInvocationHandler) {

		this.methodParameterRegistry = methodParameterRegistry;
		this.mockFactory = mockFactory;
		this.proxyFactory = proxyFactory;
		this.collaboratorsInvocationHandler = collaboratorsInvocationHandler;
	}

	public SignatureFactory create(Resolver resolver) {
		return new SignatureFactory(methodParameterRegistry, resolver, mockFactory, proxyFactory,
			collaboratorsInvocationHandler);
	}
}
